﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="sceneryImg.aspx.cs" Inherits="GDIT.page.manage.content.sceneryImg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>学校风貌图片</title>
    <link href="../../../css/m_imgLink.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<div class="all">





<!--图片布阵开始-->
<div class="imgsNav">
    <div class="titleImg">珠海风貌</div>
    <div class="divide"></div>
    <ul class="imgsUl imgsUl1">
        <asp:Repeater ID="ZHRepeater" runat="server">
            <ItemTemplate>
                <li><img alt='<%#DataBinder.Eval(Container.DataItem, "OID") %>|../../../<%#DataBinder.Eval(Container.DataItem, "PicPath") %>|<%#DataBinder.Eval(Container.DataItem, "Alt") %>|<%#DataBinder.Eval(Container.DataItem, "PicPath") %>|<%#DataBinder.Eval(Container.DataItem, "Title") %>' src='../../../<%#DataBinder.Eval(Container.DataItem, "PicPath") %>' /></li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
    <div class="titleImg">广州风貌</div>
    <div class="divide"></div>
    <ul class="imgsUl imgsUl1">
        <asp:Repeater ID="GZRepeater" runat="server">
            <ItemTemplate>
                <li><img alt="<%#DataBinder.Eval(Container.DataItem, "OID") %>|../../../<%#DataBinder.Eval(Container.DataItem, "PicPath") %>|<%#DataBinder.Eval(Container.DataItem, "Alt") %>|<%#DataBinder.Eval(Container.DataItem, "PicPath") %>|<%#DataBinder.Eval(Container.DataItem, "Title") %>" src="../../../<%#DataBinder.Eval(Container.DataItem, "PicPath") %>" /></li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
    <div class="titleImg">领导豪笔</div>
    <div class="divide"></div>
    <ul class="imgsUl imgsUl1">
        <asp:Repeater ID="LDRepeater" runat="server">
            <ItemTemplate>
                <li><img alt="<%#DataBinder.Eval(Container.DataItem, "OID") %>|../../../<%#DataBinder.Eval(Container.DataItem, "PicPath") %>|<%#DataBinder.Eval(Container.DataItem, "Alt") %>|<%#DataBinder.Eval(Container.DataItem, "PicPath") %>|<%#DataBinder.Eval(Container.DataItem, "Title") %>" src="../../../<%#DataBinder.Eval(Container.DataItem, "PicPath") %>" /></li>
            </ItemTemplate>
        </asp:Repeater>
    </ul>
</div>
<!--图片布阵结束-->

<!--弹出层开始-->
<div class="popupOut"></div>
<div class="popupInner">
    <asp:HiddenField ID="txtId" runat="server" />
            
    <span class="lblName">图片名称:</span>
    <asp:TextBox ID="txtName" runat="server" CssClass="name"></asp:TextBox>

    <span class="lblImg">图片预览:</span>
    <asp:Image ID="ShowImage" runat="server" CssClass="img" />
   
    <span class="lblAlt">图片描述:</span>
    <asp:TextBox ID="txtAlt" runat="server" CssClass="alt" TextMode="MultiLine"></asp:TextBox>
    
    <asp:FileUpload ID="filPath" runat="server" CssClass="path" />

    <asp:LinkButton ID="btnSave" runat="server" CssClass="save" OnClick="btnSave_OnClick">保存修改</asp:LinkButton>

    <a href="javascript:void(0);" onclick="ClosePopup();" class="close"></a>
</div>
<!--弹出层结束-->


<script type="text/javascript">
    function Ready() {
        var imgsNav = GetElementsByClass("imgsNav");
        var imgs = imgsNav.getElementsByTagName("img");
        for (var i = 0; i < imgs.length; i++) {
            imgs[i].onclick = img_click;
        }
    }
    Ready();

    function img_click() {
        GetElementsByClass("popupOut")[0].style.display = "block";
        GetElementsByClass("popupInner")[0].style.display = "block";
        var parms = this.alt.split("|");
        document.getElementById("txtId").value = parms[0];
        document.getElementById("ShowImage").src = parms[1];
        document.getElementById("txtAlt").src = parms[2];
        document.getElementById("txtName").src = parms[3];
    }

    function ClosePopup() {
        GetElementsByClass("popupOut")[0].style.display = "none";
        GetElementsByClass("popupInner")[0].style.display = "none";
    }

    function GetElementsByClass(className) {
        var events = new Array();
        var allEvents = document.getElementsByTagName("*");
        for (var i = 0; i < allEvents.length; i++) {
            var classNames = allEvents[i].className.split(" ");
            for (var j = 0; j < classNames.length; j++) {
                if (classNames[j] == className) {
                    events[events.length] = allEvents[i];
                }
            }
        }
        return events;
    }
</script>




</div>
</form>
</body>
</html>
